/*
X2Play
Copyright (C) 2008  Jitu Das

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program.  If not, see <http://www.gnu.org/licenses/>.
*/

#ifndef XMMSCLIENTPP
#define XMMSCLIENTPP
#include <xmmsclient/xmmsclient++.h>
#endif

#ifndef XMMS2CONN_H
#define XMMS2CONN_H

#include <QThread>
#include <QStringList>
#include <QMessageBox>
#include <QProcess>

class XMMS2Conn : public QThread, public Xmms::Client
{
	Q_OBJECT
public:
	XMMS2Conn(const std::string &name);
	void searchText(const QString &text);
	void playId(unsigned int id, bool queue = false);
	void doCommand(const QString &cmd);
	void waitUntilReady();

private:
	QString searchString;
	bool forceQuit;
	bool searchFinished;

protected:
	virtual void run();

signals:
	void updatedMatches(QList<QStringList> &);
};

#endif
